package com.xinyi.traditionmvvm.base.holder;

import android.view.View;

import androidx.annotation.NonNull;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import androidx.recyclerview.widget.RecyclerView;

/**
 * @author 杨耿雷
 * @date 2024/9/25 15:32
 * @description RecyclerView.ViewHolder的ViewBinding基类
 */
public abstract class BaseViewBindingViewHolder<VDB extends ViewDataBinding> extends RecyclerView.ViewHolder {

    /**
     * ViewBinding对象
     */
    protected VDB binding;

    public BaseViewBindingViewHolder(@NonNull View itemView) {
        super(itemView);
        binding = DataBindingUtil.bind(itemView);
    }
}
